package com.example.provider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangjinlong
 * @date 2022/1/26 14:34
 */
@RefreshScope
@RestController
@RequestMapping("/myrest/provider")
public class ProviderController {

    @Value("${nacos.config:1}")
    private Integer config;

    @GetMapping("get")
    public String get(){
        return "hello I'm provider 1, config =  " + config;
    }
}
